-
Notifications
You must be signed in to change notification settings - Fork 614
Fix Crash when open file via OS while File > Open dialog is left open (adobe/brackets#7752) #450
Conversation
Nit for the future: it's best if commit logs include a semantic description of the change in addition to the bug reference. |
Also nit -- helpful if the PR title says the name of the bug, or at least a shortened version of it. In places like issue search result lists and GH email notifications, this makes it much easier to see what bug you're referring to (though even when looking directly at this one PR, it's faster than having to hover or click the link to get the issue title). |
Fixed the title and comment. |
@ingorichter This fixes the crash, but the most recently requested file is then not opened by Brackets. Is it possible to fix it so that Brackets does succeed in opening the file? Or, maybe at least, bring the Brackets window to the front so that the user can see that it's in the middle of a modal Open dialog? |
@bchintx I haven't looked at implementing this behavior and I don't know how much work this will be. What is the behavior with other apps? |
@ingorichter Other editors work just fine -- ie. the document opens just fine, even while the File Open dialog remains open. |
@bchintx @ingorichter Bring to the front (but do nothing else) seems like a reasonable compromise, if it's tricky to have it actually open the file behind the modal dialog. |
Thanks for updating the title btw @ingorichter! |
…log is opened and derive the CefBrowser instance from that window
If a modal dialog is open (Open/Save), the parent window will be used to find the required CefBrowser instance. This makes the null check in |
@ingorichter I just tested the latest change on my Mac OSX 10.8.5 system. Unfortunately, Brackets still crashes when I try the "Open With..." workflow. Also, the Brackets window doesn't come to the front when I drag-drop a file from the Finder onto the Brackets window either (as I'm assuming it should per your code comment). At this point, I'm completely fine with your earlier fix of at least fixing the crash -- ie. but that the file is not ever opened nor is the Brackets window brought to front. I guess it's better to not crash, at least. |
@bchintx Yes, I could go back to the previous fix, even if it feels like fixing symptoms. :-( |
@ingorichter to test the |
@bchintx @RaymondLim I have reverted to my previous fix. Would you mind to check this fix again on your machines? Thanks. |
@ingorichter Latest change works great for me. No crashes on my OSX 10.8.5 system following either the Finder Open With... or Finder drag-n-drop workflows. @RaymondLim if it works for you too, please go ahead and click the Merge button. |
Fix Crash when open file via OS while File > Open dialog is left open (adobe/brackets#7752)
Fix Crash when open file via OS while File > Open dialog is left open (adobe/brackets#7752)
This bug fixes adobe/brackets#7752.
Before we open any file that was either dropped or send to Brackets via "Open With...", the pointer to the browser instance will be checked to make sure it is not null.